home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr27
/
p5math.zip
/
DISMATH.ASM
next >
Wrap
Assembly Source File
|
1995-03-20
|
2KB
|
49 lines
; DisableMath()
;
; Date of Release: 3/20/95
;
; A Clipper function to disable usage of the math coprocessor,
; intended to be called when a faulty Pentium processor is
; detected.
;
; Original author Greg Martin, Horizon Real-Time Systems,
; CompuServe ID 73707,3450.
;
; This code has been released into the public domain and may be
; used or modified in any way as long as these comments
; are preserved in the source file.
;
; This function is compatible with Clipper 5.2, 5.01, 5.0, and
; Summer '87. It will have no affect on Clipper 5.3 since it
; uses a different math library.
;
; Explanation of function: The __dvinit function is called at
; startup and sets an internal flag if it detects a math
; coprocessor. This function simple gets the address of the
; internal flag from the __dvinit function and resets the flag
; to zero to disable usage of the math coprocessor.
;
; The author grants no warranties, express or implied, by
; statute or otherwise, regarding the fitness of this code for
; any purpose and in no event shall be liable for any special,
; consequential, or other damages. Use at your own risk!
; After all this is public domain software and if $1000
; commercial software comes with such disclosures then surely
; this code qualifies too.
EXTRN __dvinit:BYTE
DISMATH_TEXT SEGMENT PUBLIC WORD 'CODE'
ASSUME CS:DISMATH_TEXT
PUBLIC DISABLEMAT
DISABLEMAT: mov bx, seg __dvinit
mov es, bx
mov bx, offset __dvinit
mov bx, word ptr es:[bx+28]
mov word ptr [bx], 0000H
retf
DISMATH_TEXT ENDS
END